.class public Lcom/xingbook/park/c/a/a;
.super Landroid/widget/RelativeLayout;

# interfaces
.implements Landroid/view/View$OnClickListener;


# static fields
.field private static final a:I


# instance fields
.field private b:F

.field private c:I

.field private d:Landroid/widget/LinearLayout;

.field private e:Landroid/app/Activity;

.field private f:Ljava/util/Set;

.field private g:I

.field private h:Lcom/xingbook/park/c/a/b;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    sget v0, Lcom/xingbook/park/c/a/y;->b:I

    sput v0, Lcom/xingbook/park/c/a/a;->a:I

    return-void
.end method

.method public constructor <init>(Landroid/app/Activity;FLcom/xingbook/park/c/a/b;)V
    .locals 1

    invoke-virtual {p1}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    invoke-direct {p0, v0}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V

    const v0, -0xe74b13

    iput v0, p0, Lcom/xingbook/park/c/a/a;->c:I

    iput-object p1, p0, Lcom/xingbook/park/c/a/a;->e:Landroid/app/Activity;

    iput p2, p0, Lcom/xingbook/park/c/a/a;->b:F

    iput-object p3, p0, Lcom/xingbook/park/c/a/a;->h:Lcom/xingbook/park/c/a/b;

    invoke-direct {p0}, Lcom/xingbook/park/c/a/a;->a()V

    return-void
.end method

.method private a()V
    .locals 8

    const/4 v0, 0x2

    const v7, 0x7f0a004c

    const/4 v6, 0x0

    const/4 v5, -0x2

    iget-object v1, p0, Lcom/xingbook/park/c/a/a;->e:Landroid/app/Activity;

    invoke-virtual {v1}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;

    move-result-object v2

    new-instance v3, Landroid/widget/HorizontalScrollView;

    invoke-direct {v3, v2}, Landroid/widget/HorizontalScrollView;-><init>(Landroid/content/Context;)V

    invoke-virtual {v3, v7}, Landroid/widget/HorizontalScrollView;->setId(I)V

    invoke-virtual {v3, v6}, Landroid/widget/HorizontalScrollView;->setHorizontalScrollBarEnabled(Z)V

    new-instance v1, Landroid/widget/RelativeLayout$LayoutParams;

    const/4 v4, -0x1

    invoke-direct {v1, v4, v5}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v3, v1}, Landroid/widget/HorizontalScrollView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    invoke-virtual {p0, v3}, Lcom/xingbook/park/c/a/a;->addView(Landroid/view/View;)V

    const/high16 v1, 0x4000

    iget v4, p0, Lcom/xingbook/park/c/a/a;->b:F

    mul-float/2addr v1, v4

    float-to-int v1, v1

    if-ge v1, v0, :cond_0

    :goto_0
    new-instance v1, Landroid/view/View;

    invoke-direct {v1, v2}, Landroid/view/View;-><init>(Landroid/content/Context;)V

    const v4, -0x1f1f20

    invoke-virtual {v1, v4}, Landroid/view/View;->setBackgroundColor(I)V

    new-instance v4, Landroid/widget/RelativeLayout$LayoutParams;

    invoke-direct {v4, v5, v0}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    const/16 v0, 0x8

    invoke-virtual {v4, v0, v7}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(II)V

    const/4 v0, 0x5

    invoke-virtual {v4, v0, v7}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(II)V

    const/4 v0, 0x7

    invoke-virtual {v4, v0, v7}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(II)V

    invoke-virtual {v1, v4}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    invoke-virtual {p0, v1}, Lcom/xingbook/park/c/a/a;->addView(Landroid/view/View;)V

    new-instance v0, Landroid/widget/LinearLayout;

    invoke-direct {v0, v2}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/xingbook/park/c/a/a;->d:Landroid/widget/LinearLayout;

    iget-object v0, p0, Lcom/xingbook/park/c/a/a;->d:Landroid/widget/LinearLayout;

    invoke-virtual {v0, v6}, Landroid/widget/LinearLayout;->setOrientation(I)V

    const/high16 v0, 0x4120

    iget v1, p0, Lcom/xingbook/park/c/a/a;->b:F

    mul-float/2addr v0, v1

    float-to-int v0, v0

    iget-object v1, p0, Lcom/xingbook/park/c/a/a;->d:Landroid/widget/LinearLayout;

    invoke-virtual {v1, v0, v6, v0, v6}, Landroid/widget/LinearLayout;->setPadding(IIII)V

    iget-object v0, p0, Lcom/xingbook/park/c/a/a;->d:Landroid/widget/LinearLayout;

    new-instance v1, Landroid/view/ViewGroup$LayoutParams;

    invoke-direct {v1, v5, v5}, Landroid/view/ViewGroup$LayoutParams;-><init>(II)V

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v0, p0, Lcom/xingbook/park/c/a/a;->d:Landroid/widget/LinearLayout;

    invoke-virtual {v3, v0}, Landroid/widget/HorizontalScrollView;->addView(Landroid/view/View;)V

    return-void

    :cond_0
    move v0, v1

    goto :goto_0
.end method


# virtual methods
.method public a(Ljava/util/Set;I)V
    .locals 18

    move-object/from16 v0, p1

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/xingbook/park/c/a/a;->f:Ljava/util/Set;

    move/from16 v0, p2

    move-object/from16 v1, p0

    iput v0, v1, Lcom/xingbook/park/c/a/a;->g:I

    if-eqz p1, :cond_5

    invoke-interface/range {p1 .. p1}, Ljava/util/Set;->size()I

    move-result v2

    if-lez v2, :cond_5

    if-ltz p2, :cond_0

    invoke-interface/range {p1 .. p1}, Ljava/util/Set;->size()I

    move-result v2

    move/from16 v0, p2

    if-lt v0, v2, :cond_1

    :cond_0
    const/16 p2, 0x0

    move/from16 v0, p2

    move-object/from16 v1, p0

    iput v0, v1, Lcom/xingbook/park/c/a/a;->g:I

    :cond_1
    const/4 v2, 0x0

    move-object/from16 v0, p0

    invoke-virtual {v0, v2}, Lcom/xingbook/park/c/a/a;->setVisibility(I)V

    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/xingbook/park/c/a/a;->d:Landroid/widget/LinearLayout;

    invoke-virtual {v2}, Landroid/widget/LinearLayout;->removeAllViews()V

    const/4 v4, 0x0

    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/xingbook/park/c/a/a;->e:Landroid/app/Activity;

    invoke-virtual {v2}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;

    move-result-object v6

    const/high16 v2, 0x41f0

    move-object/from16 v0, p0

    iget v3, v0, Lcom/xingbook/park/c/a/a;->b:F

    mul-float v7, v2, v3

    const/4 v2, 0x2

    new-array v2, v2, [[I

    const/4 v3, 0x0

    const/4 v5, 0x1

    new-array v5, v5, [I

    const/4 v8, 0x0

    const v9, 0x10100a1

    aput v9, v5, v8

    aput-object v5, v2, v3

    const/4 v3, 0x1

    const/4 v5, 0x0

    new-array v5, v5, [I

    aput-object v5, v2, v3

    const/4 v3, 0x2

    new-array v3, v3, [I

    const/4 v5, 0x0

    move-object/from16 v0, p0

    iget v8, v0, Lcom/xingbook/park/c/a/a;->c:I

    aput v8, v3, v5

    const/4 v5, 0x1

    const v8, -0x99999a

    aput v8, v3, v5

    new-instance v8, Landroid/content/res/ColorStateList;

    invoke-direct {v8, v2, v3}, Landroid/content/res/ColorStateList;-><init>([[I[I)V

    const/high16 v2, 0x4100

    move-object/from16 v0, p0

    iget v3, v0, Lcom/xingbook/park/c/a/a;->b:F

    mul-float/2addr v2, v3

    float-to-int v2, v2

    const/4 v3, 0x4

    if-ge v2, v3, :cond_6

    const/4 v2, 0x2

    move v3, v2

    :goto_0
    sget v2, Lcom/xingbook/park/c/a/a;->a:I

    int-to-float v2, v2

    move-object/from16 v0, p0

    iget v5, v0, Lcom/xingbook/park/c/a/a;->b:F

    mul-float/2addr v2, v5

    float-to-int v9, v2

    const/high16 v2, 0x4214

    move-object/from16 v0, p0

    iget v5, v0, Lcom/xingbook/park/c/a/a;->b:F

    mul-float/2addr v2, v5

    float-to-int v10, v2

    invoke-interface/range {p1 .. p1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v11

    :goto_1
    invoke-interface {v11}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-nez v2, :cond_3

    if-ltz p2, :cond_2

    invoke-interface/range {p1 .. p1}, Ljava/util/Set;->size()I

    move-result v2

    move/from16 v0, p2

    if-ge v0, v2, :cond_2

    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/xingbook/park/c/a/a;->h:Lcom/xingbook/park/c/a/b;

    move/from16 v0, p2

    invoke-interface {v2, v0}, Lcom/xingbook/park/c/a/b;->a(I)V

    :cond_2
    :goto_2
    return-void

    :cond_3
    invoke-interface {v11}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/xingbook/park/b/g;

    new-instance v12, Landroid/widget/RelativeLayout;

    invoke-direct {v12, v6}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V

    new-instance v13, Lcom/xingbook/park/c/a/c;

    add-int/lit8 v5, v4, 0x1

    move-object/from16 v0, p0

    invoke-direct {v13, v0, v4}, Lcom/xingbook/park/c/a/c;-><init>(Lcom/xingbook/park/c/a/a;I)V

    invoke-virtual {v12, v13}, Landroid/widget/RelativeLayout;->setTag(Ljava/lang/Object;)V

    move-object/from16 v0, p0

    invoke-virtual {v12, v0}, Landroid/widget/RelativeLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    new-instance v4, Landroid/widget/RelativeLayout$LayoutParams;

    const/4 v14, -0x2

    const/4 v15, -0x2

    invoke-direct {v4, v14, v15}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v12, v4}, Landroid/widget/RelativeLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/xingbook/park/c/a/a;->d:Landroid/widget/LinearLayout;

    invoke-virtual {v4, v12}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    new-instance v4, Landroid/widget/TextView;

    invoke-direct {v4, v6}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    const v14, 0x7f0a004b

    invoke-virtual {v4, v14}, Landroid/widget/TextView;->setId(I)V

    invoke-virtual {v4, v10, v9, v10, v9}, Landroid/widget/TextView;->setPadding(IIII)V

    const/4 v14, 0x0

    invoke-virtual {v4, v14, v7}, Landroid/widget/TextView;->setTextSize(IF)V

    invoke-virtual {v4, v8}, Landroid/widget/TextView;->setTextColor(Landroid/content/res/ColorStateList;)V

    invoke-virtual {v12, v4}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;)V

    iput-object v4, v13, Lcom/xingbook/park/c/a/c;->c:Landroid/widget/TextView;

    new-instance v14, Landroid/view/View;

    invoke-direct {v14, v6}, Landroid/view/View;-><init>(Landroid/content/Context;)V

    move-object/from16 v0, p0

    iget v15, v0, Lcom/xingbook/park/c/a/a;->c:I

    invoke-virtual {v14, v15}, Landroid/view/View;->setBackgroundColor(I)V

    new-instance v15, Landroid/widget/RelativeLayout$LayoutParams;

    const/16 v16, -0x2

    move/from16 v0, v16

    invoke-direct {v15, v0, v3}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    const/16 v16, 0x8

    const v17, 0x7f0a004b

    invoke-virtual/range {v15 .. v17}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(II)V

    const/16 v16, 0x5

    const v17, 0x7f0a004b

    invoke-virtual/range {v15 .. v17}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(II)V

    const/16 v16, 0x7

    const v17, 0x7f0a004b

    invoke-virtual/range {v15 .. v17}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(II)V

    invoke-virtual {v14, v15}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    invoke-virtual {v12, v14}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;)V

    iput-object v14, v13, Lcom/xingbook/park/c/a/c;->b:Landroid/view/View;

    invoke-virtual {v2}, Lcom/xingbook/park/b/g;->b()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v4, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    add-int/lit8 v2, v5, -0x1

    move/from16 v0, p2

    if-ne v2, v0, :cond_4

    const/4 v2, 0x0

    invoke-virtual {v14, v2}, Landroid/view/View;->setVisibility(I)V

    move v4, v5

    goto/16 :goto_1

    :cond_4
    const/16 v2, 0x8

    invoke-virtual {v14, v2}, Landroid/view/View;->setVisibility(I)V

    move v4, v5

    goto/16 :goto_1

    :cond_5
    const/4 v2, 0x0

    move-object/from16 v0, p0

    iput v2, v0, Lcom/xingbook/park/c/a/a;->g:I

    const/16 v2, 0x8

    move-object/from16 v0, p0

    invoke-virtual {v0, v2}, Lcom/xingbook/park/c/a/a;->setVisibility(I)V

    goto/16 :goto_2

    :cond_6
    move v3, v2

    goto/16 :goto_0
.end method

.method public getResType()I
    .locals 4

    iget-object v0, p0, Lcom/xingbook/park/c/a/a;->f:Ljava/util/Set;

    if-eqz v0, :cond_0

    const/4 v0, 0x0

    iget-object v1, p0, Lcom/xingbook/park/c/a/a;->f:Ljava/util/Set;

    invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v2

    move v1, v0

    :goto_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-nez v0, :cond_1

    :cond_0
    const/4 v0, -0x1

    :goto_1
    return v0

    :cond_1
    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/xingbook/park/b/g;

    iget v3, p0, Lcom/xingbook/park/c/a/a;->g:I

    if-ne v1, v3, :cond_2

    invoke-virtual {v0}, Lcom/xingbook/park/b/g;->a()I

    move-result v0

    goto :goto_1

    :cond_2
    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_0
.end method

.method public getSelectedIndex()I
    .locals 1

    iget v0, p0, Lcom/xingbook/park/c/a/a;->g:I

    return v0
.end method

.method public getSelectedTag()Ljava/lang/String;
    .locals 4

    const/16 v3, 0xa

    iget-object v0, p0, Lcom/xingbook/park/c/a/a;->f:Ljava/util/Set;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/park/c/a/a;->f:Ljava/util/Set;

    invoke-interface {v0}, Ljava/util/Set;->size()I

    move-result v0

    :goto_0
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    if-ge v0, v3, :cond_1

    const-string v1, "0"

    :goto_1
    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    iget v0, p0, Lcom/xingbook/park/c/a/a;->g:I

    if-ge v0, v3, :cond_2

    const-string v0, "0"

    :goto_2
    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget v1, p0, Lcom/xingbook/park/c/a/a;->g:I

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0

    :cond_1
    const-string v1, ""

    goto :goto_1

    :cond_2
    const-string v0, ""

    goto :goto_2
.end method

.method public getTagSize()I
    .locals 1

    iget-object v0, p0, Lcom/xingbook/park/c/a/a;->f:Ljava/util/Set;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/park/c/a/a;->f:Ljava/util/Set;

    invoke-interface {v0}, Ljava/util/Set;->size()I

    move-result v0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public onClick(Landroid/view/View;)V
    .locals 3

    invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/xingbook/park/c/a/c;

    iget v1, v0, Lcom/xingbook/park/c/a/c;->a:I

    iget v2, p0, Lcom/xingbook/park/c/a/a;->g:I

    if-eq v1, v2, :cond_1

    iget v1, p0, Lcom/xingbook/park/c/a/a;->g:I

    if-ltz v1, :cond_0

    iget v1, p0, Lcom/xingbook/park/c/a/a;->g:I

    iget-object v2, p0, Lcom/xingbook/park/c/a/a;->d:Landroid/widget/LinearLayout;

    invoke-virtual {v2}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v2

    if-ge v1, v2, :cond_0

    iget-object v1, p0, Lcom/xingbook/park/c/a/a;->d:Landroid/widget/LinearLayout;

    iget v2, p0, Lcom/xingbook/park/c/a/a;->g:I

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v1

    invoke-virtual {v1}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/xingbook/park/c/a/c;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Lcom/xingbook/park/c/a/c;->a(Z)V

    :cond_0
    iget v1, v0, Lcom/xingbook/park/c/a/c;->a:I

    iput v1, p0, Lcom/xingbook/park/c/a/a;->g:I

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lcom/xingbook/park/c/a/c;->a(Z)V

    iget-object v0, p0, Lcom/xingbook/park/c/a/a;->h:Lcom/xingbook/park/c/a/b;

    iget v1, p0, Lcom/xingbook/park/c/a/a;->g:I

    invoke-interface {v0, v1}, Lcom/xingbook/park/c/a/b;->a(I)V

    :cond_1
    return-void
.end method
